<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.text.locale.Collation</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.text.locale.Collation");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327">tango.text.locale.Collation</a></h1>
                
<b>License:</b><br>
BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a><br><br>
<b>Version:</b><br>
Initial release: 2005<br><br>
<b>author:</b><br>John Chapman<br><br>
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L25">StringComparer</a></span>
<script>explorer.outline.addDecl('StringComparer');</script>; [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Compares strings using the specified case and cultural comparision rules.
 </font><br><br>
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L43">this</a></span>
<script>explorer.outline.addDecl('this');</script>(Culture <span class="funcparam">culture</span>, bool <span class="funcparam">ignoreCase</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Creates an instance that compares strings using the rules of the specified culture.
    </font><br><br>
<b>Params:</b><br>
<table>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">culture</span></td><td>A Culture instance whose rules are used to compare strings.</td></tr>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">ignoreCase</span></td><td>true to perform case-insensitive comparisons; false to perform case-sensitive comparisions.</td></tr></table><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L56">compare</a></span>
<script>explorer.outline.addDecl('compare');</script>(char[] <span class="funcparam">strA</span>, char[] <span class="funcparam">strB</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Compares two strings and returns the sort order.
    </font><br><br>
<b>Returns:</b><br>
-1 is strA is less than strB; 0 if strA is equal to strB; 1 if strA is greater than strB.<br><br>
<b>Params:</b><br>
<table>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">strA</span></td><td>A string to compare to strB.</td></tr>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">strB</span></td><td>A string to compare to strA.</td></tr></table><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L68">equals</a></span>
<script>explorer.outline.addDecl('equals');</script>(char[] <span class="funcparam">strA</span>, char[] <span class="funcparam">strB</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Indicates whether the two strings are equal.
    </font><br><br>
<b>Returns:</b><br>
true if strA and strB are equal; otherwise, false.<br><br>
<b>Params:</b><br>
<table>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">strA</span></td><td>A string to compare to strB.</td></tr>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">strB</span></td><td>A string to compare to strA.</td></tr></table><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>StringComparer <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L77">currentCulture</a></span>
<script>explorer.outline.addDecl('currentCulture');</script>(); [public, static]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black"><i>Property.</i> Retrieves an instance that performs case-sensitive comparisons using the rules of the current culture.
    </font><br><br>
<b>Returns:</b><br>
A new StringComparer instance.<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>StringComparer <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L86">currentCultureIgnoreCase</a></span>
<script>explorer.outline.addDecl('currentCultureIgnoreCase');</script>(); [public, static]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black"><i>Property.</i> Retrieves an instance that performs case-insensitive comparisons using the rules of the current culture.
    </font><br><br>
<b>Returns:</b><br>
A new StringComparer instance.<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>StringComparer <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L95">invariantCulture</a></span>
<script>explorer.outline.addDecl('invariantCulture');</script>(); [public, static]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black"><i>Property.</i> Retrieves an instance that performs case-sensitive comparisons using the rules of the invariant culture.
    </font><br><br>
<b>Returns:</b><br>
A new StringComparer instance.<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>StringComparer <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L104">invariantCultureIgnoreCase</a></span>
<script>explorer.outline.addDecl('invariantCultureIgnoreCase');</script>(); [public, static]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black"><i>Property.</i> Retrieves an instance that performs case-insensitive comparisons using the rules of the invariant culture.
    </font><br><br>
<b>Returns:</b><br>
A new StringComparer instance.<br><br></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>alias int delegate(char[], char[]) <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L115">StringComparison</a></span>
<script>explorer.outline.addDecl('StringComparison');</script>;</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black"><i>Delegate.</i> Represents the method that will handle the string comparison.
  </font><br><br>
<b>Remarks:</b><br>The delegate has the signature <i>int delegate(char[], char[])</i>.<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L120">StringSorter</a></span>
<script>explorer.outline.addDecl('StringSorter');</script>; [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Sorts strings according to the rules of the specified culture.
 </font><br><br>
<script>explorer.outline.incSymbolLevel();</script>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L137">this</a></span>
<script>explorer.outline.addDecl('this');</script>(StringComparer <span class="funcparam">comparer</span> = null); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Creates an instance using the specified StringComparer.
    </font><br><br>
<b>Params:</b><br>
<table>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">comparer</span></td><td>The StringComparer to use when comparing strings. <i>Optional.</i></td></tr></table><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L150">this</a></span>
<script>explorer.outline.addDecl('this');</script>(StringComparison <span class="funcparam">comparison</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Creates an instance using the specified delegate.
    </font><br><br>
<b>Params:</b><br>
<table>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">comparison</span></td><td>The delegate to use when comparing strings.</td></tr></table><br>
<b>Remarks:</b><br>The comparison parameter must have the same signature as StringComparison.<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L159">sort</a></span>
<script>explorer.outline.addDecl('sort');</script>(inout char[][] <span class="funcparam">array</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Sorts all the elements in an array.
    </font><br><br>
<b>Params:</b><br>
<table>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">array</span></td><td>The array of strings to _sort.</td></tr></table><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L170">sort</a></span>
<script>explorer.outline.addDecl('sort');</script>(inout char[][] <span class="funcparam">array</span>, int <span class="funcparam">index</span>, int <span class="funcparam">count</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Sorts a range of the elements in an array.
    </font><br><br>
<b>Params:</b><br>
<table>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">array</span></td><td>The array of strings to _sort.</td></tr>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">index</span></td><td>The starting index of the range.</td></tr>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">count</span></td><td>The number of elements in the range.</td></tr></table><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>StringSorter <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L215">currentCulture</a></span>
<script>explorer.outline.addDecl('currentCulture');</script>(); [public, static]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black"><i>Property.</i> Retrieves an instance that performs a case-sensitive sort using the rules of the current culture.
    </font><br><br>
<b>Returns:</b><br>
A StringSorter instance.<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>StringSorter <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L223">currentCultureIgnoreCase</a></span>
<script>explorer.outline.addDecl('currentCultureIgnoreCase');</script>(); [public, static]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black"><i>Property.</i> Retrieves an instance that performs a case-insensitive sort using the rules of the current culture.
    </font><br><br>
<b>Returns:</b><br>
A StringSorter instance.<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>StringSorter <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L231">invariantCulture</a></span>
<script>explorer.outline.addDecl('invariantCulture');</script>(); [public, static]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black"><i>Property.</i> Retrieves an instance that performs a case-sensitive sort using the rules of the invariant culture.
    </font><br><br>
<b>Returns:</b><br>
A StringSorter instance.<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>StringSorter <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/text/locale/Collation.d?rev=3327#L239">invariantCultureIgnoreCase</a></span>
<script>explorer.outline.addDecl('invariantCultureIgnoreCase');</script>(); [public, static]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black"><i>Property.</i> Retrieves an instance that performs a case-insensitive sort using the rules of the invariant culture.
    </font><br><br>
<b>Returns:</b><br>
A StringSorter instance.<br><br></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></dd></dl>
<script>explorer.outline.decSymbolLevel();</script></td></tr>
                <tr><td id="docfooter">
                        Copyright (c) 2005 John Chapman. All rights reserved :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Tue Mar  4 22:45:30 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>